import {ref} from "vue";
import {defineStore} from "pinia";


export default defineStore("userStore",()=>{
    const userModel=ref({
        uid:-1,
        webUserInfo:{}
    })
    const setUserInfo = (data) => {
        userModel.value = data
    }

    return {userModel,setUserInfo}
},{
    persist:{
        storage: sessionStorage, //选择存储位置如LocalStorage
        paths:['userModel']  //要存储的内容
    },

})